<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <button @click="count++">+</button>
        <div style="background-color: blueviolet; width: 100px; height: 100px;" v-if="count>=10"></div>
        <div v-if="show%2===0">xs</div>
        <button @click="add">点击</button>
       
            <button @click="a--" :disabled="a===1">-</button>
            <h1>{{a}}</h1>
            <button @click="a++" :disabled="a===10">+</button>
       
    </div>
   
</body>
<script src="/vue.js">
</script>
<script>
    const{ createApp,ref }=Vue
    const app = createApp({
        setup(){
            let count=ref(0)
            let show=ref(0)
            let a=ref(0)
            function add(){
                show.value++,
                a
            }
            return{
                count,
                add,
                show,
                a
            }
        }
    }).mount('#app')

</script>
   

</html>